Kleene Monads: Handling Iteration in a Framework of Generic Effects

نویسندگان

  • Sergey Goncharov
  • Lutz Schröder
  • Till Mossakowski
چکیده

Monads are a well-established tool for modelling various computational effects. They form the semantic basis of Moggi’s computational metalanguage, the metalanguage of effects for short, which made its way into modern functional programming in the shape of Haskell’s do-notation. Standard computational idioms call for specific classes of monads that support additional control operations. Here, we introduce Kleene monads, which additionally feature nondeterministic choice and Kleene star, i.e. nondeterministic iteration, and we provide a metalanguage and a sound calculus for Kleene monads, the metalanguage of control and effects, which is the natural joint extension of Kleene algebra and the metalanguage of effects. This provides a framework for studying abstract program equality focussing on iteration and effects. These aspects are known to have decidable equational theories when studied in isolation. However, it is well known that decidability breaks easily; e.g. the Horn theory of continuous Kleene algebras fails to be recursively enumerable. Here, we prove several negative results for the metalanguage of control and effects; in particular, already the equational theory of the unrestricted metalanguage of control and effects over continuous Kleene monads fails to be recursively enumerable. We proceed to identify a fragment of this language which still contains both Kleene algebra and the metalanguage of effects and for which the natural axiomatisation is complete, and indeed the equational theory is decidable.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Typed Kleene Algebra with Products and Iteration Theories

We develop a typed equational system that subsumes both iteration theories and typed Kleene algebra in a common framework. Our approach is based on cartesian categories endowed with commutative strong monads to handle nondeterminism.

متن کامل

Kleene Algebra with Products and Iteration Theories

We develop a typed equational system that subsumes both iteration theories and typed Kleene algebra in a common framework. Our approach is based on cartesian categories endowed with commutative strong monads to handle nondeterminism. 1998 ACM Subject Classification F.3.1 Specifying and Verifying and Reasoning about Programs

متن کامل

Unguarded Recursion on Coinductive Resumptions

A pervasive challenge in programming theory and practice are feature combinations. Here, we propose a semantic framework that combines monad-based computational effects (e.g. store, nondeterminism, random), underdefined or free operations (e.g. actions in process algebra and automata, exceptions), and recursive definitions (e.g. loops, systems of process equations). The joint treatment of these...

متن کامل

Complete Elgot Monads and Coalgebraic Resumptions

Monads are extensively used nowadays to abstractly model a wide range of computational effects such as nondeterminism, statefulness, and exceptions. It turns out that equipping a monad with a (uniform) iteration operator satisfying a set of natural axioms allows for modelling iterative computations just as abstractly. The emerging monads are called complete Elgot monads. It has been shown recen...

متن کامل

Partially Ordered Monads for Monadic Topologies, Rough Sets and Kleene Algebras

In this paper we will show that partially ordered monads contain sufficient structure for modelling monadic topologies, rough sets and Kleene algebras. Convergence represented by extension structures over partially ordered monads includes notions of regularity and compactness. A compactification theory can be developed. Rough sets [23] are modelled in a generalized setting with set functors. Fu...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2009